package com.wty.design.structural.facade.exchangeGift;

/**
 * @Author wangtengyu
 * @Create 2018-09-19-8:47
 */
public class Test {

    public static void main(String[] args) {
        //v1版本 非外观模式
//        Gift gift=new Gift("dark soul");
//        QualifyService qualifyService=new QualifyService();
//        payService payService=new payService();
//        ShipService shipService=new ShipService();
//
//        qualifyService.isAvailable(gift);
//        payService.pay(gift);
//        shipService.shipping(gift);

        //版本v2 外观模式
        Gift gift=new Gift("blood board");
        ExchangeGiftService exchangeGiftService=new ExchangeGiftService();
        exchangeGiftService.isAvailable(gift);
        exchangeGiftService.pay(gift);
        exchangeGiftService.ship(gift);




    }
}
